package com.hn.zhijian.base.data.common;

import com.hn.zhijian.utils.Utils;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author carl chen
 * @date 2018/2/7.
 */
@Data
public class DBType {



//    DB_DEFAULT("dbDefault"), PLAN("plan"),GHGL("ghgl");


    private static DBType dbTypeEnum;

    private List<String> listName;

    private String defaultName;

    private DBType(){}

    /**
     * 初始化
     * @return
     */
    public static DBType instance(){
        if(Utils.isEmpty(dbTypeEnum)){
            dbTypeEnum = new DBType();
        }
        return dbTypeEnum;
    }

    public void setListName(String dbName){
        if(Utils.isEmpty(listName)){
            listName = new ArrayList<>();
        }
        listName.add(dbName);
    }

    public List<String> getListName(){
        return listName;
    }
}
